<template>
    <div class="card rdsp-card-view maintainceEquip-page" data-page="maintainceEquip">
        <div class="card-content card-content-padding">
            <div class="maintaince-card-title">
                <!-- <span class="icon"></span> -->
                <span>物联设备</span>
            </div>
            <div class="maintainceEquip-con">
                <div @click="openEqList(0)">
                    <p class="all" id="eqAll">0</p>
                    <span>设备总数</span>
                </div>
                <div @click="openEqList(2)">
                    <p id="eqDefaultAll">0</p>
                    <span>故障总数</span>
                </div>
                <div @click="openEqList(2)">
                    <p id="eqNewDefault">0</p>
                    <span>今日新故障</span>
                </div>
            </div>
        </div>
    </div>
</template>
<style scoped>

</style>
<script>
    return {
        data:function () {
            return{
            }
        },
        methods: {
            getEquipmentStatu:function(){
                let self = this;
                Dao.getFcfRealTimeStatusCountOverview({
                	orgId:single_Orgid_wbdw
                },function(data){
                    if(data){
                        $("#eqAll").html(common.transNullundefinedToZero(data.count));
                        $("#eqDefaultAll").html(common.transNullundefinedToZero(data.faultAlarmCount));
                        $("#eqNewDefault").html(common.transNullundefinedToZero(data.faultFcfCount));
                    }
                });
            },
            openEqList(type){
                app.router.navigate("/moreDectorState/"+type+"/"+single_Orgid_wbdw+"/11/2/");
            }
        },
        on: {
            pageAfterIn: function (e, page) {
                var self = this;
                self.getEquipmentStatu();
            }
        }
    }
</script>